import java.util.Scanner;
import java.util.Arrays;
class Rectangle{
    private int width;
    private int length;
    public Rectangle(int width,int length){
        this.width=width;
        this.length=length;
    }
    public int getPerimeter(){
        return (this.width+this.length)*2;
    }
    public int getArea(){
        return this.width*this.length;
    }

    @Override
    public String toString() {
        return "Rectangle{" +
                "width=" + width +
                ", length=" + length +
                '}';
    }
}
class Circle{
    private int radius;

    public Circle(int radius) {
        this.radius = radius;
    }
    public int getPerimeter(){
        return (int)(2*Math.PI*this.radius);
    }
    public int getArea(){
        return (int)(Math.PI*Math.pow(this.radius,2));
    }

    @Override
    public String toString() {
        return "Circle{" +
                "radius=" + radius +
                '}';
    }
}
public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        Rectangle[] rectangles=new Rectangle[2];
        Circle[] circles=new Circle[2];
        for (int i = 0; i < rectangles.length; i++) {
            int width = scanner.nextInt();
            int length = scanner.nextInt();
            rectangles[i] = new Rectangle(width, length);
        }
        for (int i = 0; i < circles.length; i++) {
            int radius = scanner.nextInt();
            circles[i] = new Circle(radius);
        }
        int sum1=rectangles[0].getPerimeter()+rectangles[1].getPerimeter()+circles[0].getPerimeter()+circles[1].getPerimeter();
        int sum2=rectangles[0].getArea()+rectangles[1].getArea()+circles[0].getArea()+circles[1].getArea();
        System.out.println(sum1);
        System.out.println(sum2);
        System.out.println(Arrays.deepToString(rectangles));
        System.out.println(Arrays.deepToString(circles));
    }
}